Skip to content

Feat(client): ParentTagList 컴포넌트 구현 - #292

Open
twossu wants to merge 5 commits into
developfrom
feat/parent-tag-list-component/#291
Open

Feat(client): ParentTagList 컴포넌트 구현#292
twossu wants to merge 5 commits into
developfrom
feat/parent-tag-list-component/#291

Conversation

@twossu

@twossu twossu commented Aug 19, 2026

Copy link
Copy Markdown
Member

📌 Summary

부모 태그를 선택할 수 있는 ParentTagList 컴포넌트를 구현했습니다.

📚 Tasks

  • SidebarItemNavItem으로 네이밍 변경 및 공용 컴포넌트로 위치 이동
  • ParentTagList 컴포넌트 및 스타일 구현
  • 전역 스크롤바 스타일을 모든 요소에 적용되도록 분리

🔍 Describe

SidebarItem -> NavItem

ParentTagList도 "아이콘 + 텍스트 + 선택 상태"를 가진 클릭 가능한 아이템이 필요했는데 기존 SidebarItem은 사이드바 폴더 안에 있어서 재사용하기엔 위치도 이름도 맞지 않았습니다. 단순히 import 경로만 끌어오기보다 사이드바 전용이라는 이름 자체가 재사용을 가로막는 요소라고 판단해 shared/components로 옮기고 NavItem이라는 더 일반적인 이름으로 바꿨습니다. 더 아름답고 직관적인 이름이 있다면 추천해주시라요🧎

TagNode[]

같은 태그 데이터를 다루는 SidebarTagItemTreeNode<TagNode>를 받아 children을 재귀적으로 순회하며 트리 전체를 그립니다. 반면 ParentTagList는 자식 태그를 다루지 않고 부모 태그만 한 줄로 나열하는 게 목적이라 트리 순회가 필요 없는 만큼 평면 배열인 TagNode[]를 그대로 사용했습니다.

전역 스크롤바 스타일을 분리한 이유

기존에는 scrollbarWidth/scrollbarColor/scrollBehaviorglobalStyle('html, body', …) 안에 묶여 있어서 사실상 최상위 스크롤에만 얇은 스크롤바가 적용되고 있었습니다. ParentTagList는 컴포넌트 내부에 overflow-y: auto를 가진 자체 스크롤 영역이 있는데 이 규칙이 html, body에만 걸려 있다 보니 내부 스크롤에는 적용되지 않고 브라우저 기본 스크롤바가 그대로 노출됐습니다.

이 컴포넌트 하나만을 위해 로컬 스타일로 스크롤바를 다시 정의하면 당장은 해결되지만 앞으로 추가될 다른 스크롤 영역마다 같은 코드를 반복하게 됩니다. 스크롤바 스타일은 컴포넌트 단위가 아니라 디자인 시스템 레벨의 규칙이라고 보는 게 맞다고 판단해 * 셀렉터로 옮겨 모든 요소에 일관되게 적용되도록 분리했습니다.

📸 Screenshot

parent-tag-screenshot
parent-tag-recording.mp4

@twossu
twossu requested a review from a team as a code owner August 19, 2026 14:40
@twossu
twossu requested review from jm8468, jogpfls and jyeon03 and removed request for a team August 19, 2026 14:40
@twossu twossu linked an issue Aug 19, 2026 that may be closed by this pull request
@github-actions github-actions Bot added ✨ Feat 새로운 기능 추가 🦦 최윤하 웹 37기 최윤하 labels Aug 19, 2026
@twossu twossu changed the title [Feat] ParentTagList 컴포넌트 구현 Feat(client): ParentTagList 컴포넌트 구현 Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

🎨 Storybook 배포 완료

PR 작성자: @twossu

🔗 배포된 Storybook 보기

@twossu
twossu marked this pull request as draft August 19, 2026 14:45
@twossu
twossu changed the base branch from develop to feat/tag-tree-select-component/#286 August 20, 2026 07:17
@twossu
twossu marked this pull request as ready for review August 20, 2026 07:26
@twossu
twossu marked this pull request as draft August 21, 2026 23:17
@twossu
twossu marked this pull request as ready for review August 21, 2026 23:17
@twossu
twossu force-pushed the feat/parent-tag-list-component/#291 branch 2 times, most recently from 40a8c2e to d62eee2 Compare August 22, 2026 13:33

@jm8468 jm8468 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿!

Comment thread apps/client/src/shared/components/menu-item/menu-item.tsx Outdated
Comment thread apps/client/src/shared/components/nav-item/nav-item.tsx Outdated
}

const SidebarItem = ({
const NavItem = ({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어떤 컴포넌트 이름을 하게되든 이 컴포넌트 props가 ButtonHTMLAttributes를 상속받는다고 예상하기 어려워용

onClick과 disabled도 props로 직접 드러내면 좋을 것 같아요!
상속은 아예 없애구요

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전 사이드바 리팩토링에서 비슷한 코멘트가 있었던 것 같아서 확인해봤는데 그때 제안 주셨던 extends ButtonHTMLAttributes + onClickItem 방식이 아니라 Pick<'onClick' | 'disabled'> 형태로 merge되어 있더라고요.
지금도 Pick으로 onClick, disabled를 명시적으로 노출되고 있어서 어느 정도 예측 가능하고 확장성도 있다고 생각하는데 그래도 상속 자체를 완전히 없애는 방향으로 바꾸는 게 나을까요?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아까 디코에서 얘기드렸던것과 비슷한 맥락으로
MenuItem이라는 컴포넌트 명과 props만 보고, 컴포넌트 내부에서 <ButtonHTMLAttributes>를 상속받고 있다고 보기 어려웠어요.

컴포넌트 설계에서 중요한 점 중 하나는

  1. 컴포넌트 내부 로직을 보지않고,
  2. 컴포넌트 명과
  3. props만으로 어떻게 사용할지 알아야 한다

라고 생각해요

@jm8468 jm8468 Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

생각해보시고 자유롭게 반영해주세요!

Base automatically changed from feat/tag-tree-select-component/#286 to develop August 23, 2026 11:24
@twossu
twossu force-pushed the feat/parent-tag-list-component/#291 branch 2 times, most recently from 9ca9285 to 3c8aaef Compare August 23, 2026 11:32
@twossu
twossu force-pushed the feat/parent-tag-list-component/#291 branch from 5d648fc to 95dd62e Compare August 23, 2026 14:20
Comment on lines 12 to +14
content?: string;
isSelected?: boolean;
size?: 'sm' | 'lg';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 optional 여부도 변경해주세영

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 새로운 기능 추가 🦦 최윤하 웹 37기 최윤하

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] ParentTagList 컴포넌트 구현

2 participants